package itsm.isperp.module.controller;

import itsm.isperp.framework.core.context.ContextHolder;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.json.JSONException;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.baidu.ueditor.ActionEnter;

/**
 * 系统控制器（初次进入系统）
 * 
 * @author lizx
 * @date 2013-1-7
 * @version V1.0
 */
@Controller
@RequestMapping("ueditor")
public class UEditorController {

	@ResponseBody
	@RequestMapping(value = "enter")
	public String enter(HttpServletRequest request, HttpServletResponse response) {

		try {
			return new ActionEnter(request, ContextHolder.getApplicationPath())
					.exec();
		} catch (JSONException e) {
			return "";
		}
	}

}
